The CGI scripts <a href="http://notex.googlecode.com/files/notex.cgi">notex.cgi</a> and <a href="http://notex.googlecode.com/files/notex.fcgi">notex.fcgi</a> run your JavaScript files on a web server. These JavaScript files may contain calls to the NOTEX functions below, which are exposed to your JavaScript programs by the NOTEX CGI scripts. This is different from JavaScript that runs in the web browser - you have no "document" or "window" objects in a NOTEX JavaScript program, only the functions below.

<h3>http(header) &amp; https(header)</h3>
Get an HTTP(S) header (e.g. 'user-agent') that was sent in the HTTP request to this script

<h3>write(output)</h3>
Write some text output from this script, for example an XML response

<h3>read(filename)</h3>
Read a filename, provided that the file is JavaScript ending in ".js" or ".jsx". This enables you to include JavaScript files inside other JavaScript files.

<h3>param(name, [default])</h3>
Read a parameter from the HTTP request, for example "app" from the query string "?app=demo&amp;token=abcd" and return it, or return any default value.

<h3>config(name, [value])</h3>
Get (or set) a configuration variable, including:
<ul>
  <li><b>app:</b> the application name running this CGI script</li>
  <li><b>token:</b> the app token (a filename in the app’s directory)</li>
  <li><b>script:</b> the script being run (either a URL or a file path)</li>
  <li><b>remote_host:</b> the remote host name or address running the script</li>
  <li><b>user_agent:</b> by default the user agent is called "NOTEX/1.6"</li>
  <li><b>http_timeout:</b> by default the HTTP request timeout is 10 seconds</li>
  <li><b>content_type:</b> defaults to "text/xml" but can be any other type</li>
  <li><b>xml_encoding:</b> defaults to "utf-8" for Unicode but can be other</li>
  <li><b>clean_up_xml:</b> defaults to 1 to remove &lt;?xml... and &lt;!DOCTYPE...</li>
</ul>

<h3>cookie(name, [value], [expires], [path], [domain], [secure])</h3>
Get or set an HTTP cookie, with various parameters

<h3>header(name, [value])</h3>
Set an HTTP header to be sent in the HTTP response sent by this script

<h3>method()</h3>
Return the HTTP method used in the HTTP request received by this script

<h3>status()</h3>
Return the HTTP status of the most recent HTTP response that was received by this script, after a call to "GET", "HEAD", "DELETE", "POST" or "PUT" (see below)

<h3>GET(url) &amp; HEAD(url) &amp; DELETE(url)</h3>
Use HTTP method "GET", "HEAD" or "DELETE" to request a URL

<h3>PUT(url, content) &amp; POST(url, content)</h3>
Use HTTP method "PUT" or "POST" to send some content to a URL

<h3>log(text)</h3>
Log some text to the app's log file for today's activity (to be found in "/apps/name/logs/20090213.log" or similar)

<h3>md5(text)</h3>
Return the MD5 checksum in hex format for some text data

<h3>env(variable)</h3>
Return the value of an environment variable. These can be set using your .htaccess file like this: <code>Setenv DB_USER username</code>

<h3>load(name, [seconds])</h3>
Load a filename from the app's cache (if it's not older than "seconds")

<h3>save(name, content)</h3>
Save some content to a filename in the app's cache

